<!-- 内容右侧 -->
  <aside class="col-span-2">
    <div
      id="right-box-fixed"
      class="pb-12 max-lg:left-0 max-lg:overflow-auto max-lg:hidden max-lg:w-screen max-lg:h-screen max-lg:fixed max-lg:top-16 max-lg:z-50 h-fit"
    >
      <slot />
    </div>
  </aside>

  <script>
    const rightBox = document.getElementById("right-box-fixed");
    const browserWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
    if (browserWidth >= 1024 && rightBox) {
        const asideHolders = document.querySelectorAll(".aside-auto-hold");
        let preHig=400;
        asideHolders.forEach((holder) => {
            const targetId = holder.dataset.targetId;
            const targetElement = targetId ? document.getElementById(targetId) : null;
            if (targetElement) {       
                holder.style.height = `${ preHig>targetElement.offsetHeight?preHig-targetElement.offsetHeight:holder.offsetHeight+targetElement.offsetHeight-preHig}px`;
                 preHig=holder.offsetHeight;
            }
        });
    }
</script>